#include "RenderFactory.h"
//#include "RendBase.h"
#include "Board64_2.h"
#include "Sierpinski.h"
#include "Triangle_strip.h"
RendBase* RenderFactory::createRender(int type)
{

	// how and when to release the obj created by the factory.
	RendBase* render = nullptr;
	switch (type)
	{

		case RENDER_BOARD:
		{
							 render = new Board64_2();

		}
			break;

		case RENDER_SIERPINSKI:
	{
							  render = new Sierpinski();
	}
		break;

		case RENDER_TRIANGLE_STRIP:
	{
								  render = new Triangle_strip();
	}
		break;
	}
		


	return render;
}
/*
void RenderFactory::purge()
{
	for (int i = 0; i < arr.size(); i++)
	{
		delete arr[i];
		arr[i] = nullptr;
	}

}
*/
